package com.itheima01.day08;

import java.util.Scanner;

/**
 * @author 刘全
 * @date 2021/7/9
 */
public class String3 {
    public static void main(String[] args) {
        //需求：以字符串的形式从键盘接受一个手机号，将中间四位号码屏蔽
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入手机号码:");
        String s1 = sc.nextLine();
        String s2 = s1.substring(0, 3);
        String s3 = s1.substring(7);
        System.out.println(s2+"****"+s3);
    }
}
